package io.github.wx.core.interceptor;

import com.jfinal.aop.Interceptor;
import com.jfinal.aop.Invocation;
import com.jfinal.kit.LogKit;

/**
 * Created by jie on 2017/4/8.
 * 日志和统一异常处理
 */
public class LogAndExceptionInterceptor implements Interceptor {
    public void intercept(Invocation inv) {
        inv.getController().getPara()
        try {
            inv.invoke();
        } catch (Exception e) {
            LogKit.error("===========系统异常===========", e);
        } finally {
            //TODO 插入日志表
        }
    }
}
